import request from '@/api/request.js'


export default {
  // 生产工艺列表
  kMaintainList(form,kLabel){
    return request({
      url:'/kMaintain/query/'+form.currentPage+'/'+form.pageSize,
      method:'post',
      data:{
        kLabel
      }
    })
  },

  // 生产工艺列表
  kMaintainQuery(kid){
    return request({
      url:'/kMaintain/queryMaintain',
      method:'post',
      data:{
        kid
      }
    })
  },



  //关系列表
  kMaintainRelationList(){
    return request({
      url:'/kMaintainRelation/queryRelationLabel',
      method:'post',
      data:{

      }
    })
  },

  //实体关系查询
  kMaintainRelationQuery(form){
    return request({
      url:'/kMaintainRelation/queryRelation',
      method:'post',
      data:{
        entity1:form.entity1,
        entity2:form.entity2,
        relation:form.relation
      }
    })
  },


  //实体查询
  entityQuery(entity1){
    return request({
      url:'/kMaintainRelation/queryEntity',
      method:'post',
      data:{
        entity1
      }
    })
  },

  //事理查询
  affairQuery(form){
    return request({
      url:'/kLogicRelation/query',
      method:'post',
      data:{
        ...form
      }
    })
  },
  //药知问答
  queryAnswer(str){
    return request({
      url:'/kMaintainRelation/queryAnswer',
      method:'post',
      data:{
        str
      }
    })
  },

  //药知问答
  medAnswerTop(type){
    return request({
      url:'/wQuestion/query/'+5,
      method:'post',
      data:{
        type
      }
    })
  },


  //工艺编辑
  kmaintainEdit(attributeVOList,kMaintainVO,oldKId,relationVOList){
    return request({
      url:'/kMaintain/edit',
      method:'post',
      data:{
        attributeVOList,
        kMaintainVO,
        oldKId,
        relationVOList
      }
    })
  },

  //工艺添加
  kmaintainAdd(attributeVOList,kMaintainVO,kLabel,relationVOList){
    return request({
      url:'/kMaintain/edit',
      method:'post',
      data:{
        attributeVOList,
        kMaintainVO,
        kLabel,
        relationVOList
      }
    })
  },


  //工艺添加
  kmaintainDelete(kid){
    return request({
      url:'/kMaintain/delete',
      method:'post',
      data:{
        kid
      }
    })
  },
}
